package com.app.controller;

import com.app.entity.Person;
import com.app.service.JsonService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class PersonController {

    @Resource
    private JsonService jsonService;

    @PostMapping("rs")
    public String getRs(@RequestBody Person person) {
        return jsonService.objectToMyJson(person);
    }
}
